package com.summer.bean;

import java.util.Objects;

/**
 * Created by IntelliJ IDEA.
 * Description:
 * User: 35391
 * Package: com.summer.pojo
 * Date: 2025/3/24
 * Time: 上午11:31
 * Version: 1.0
 */
public class Course {
    private String cno;
    private String cname;
    private String credit;

    public Course() {
    }
    public Course(String cno, String cname, String credit) {
        this.cno = cno;
        this.cname = cname;
        this.credit = credit;
    }

    @Override
    public String toString() {
        return "Course{" +
                "cno='" + cno + '\'' +
                ", cname='" + cname + '\'' +
                ", credit='" + credit + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Course course = (Course) o;
        return Objects.equals(cno, course.cno) && Objects.equals(cname, course.cname) && Objects.equals(credit, course.credit);
    }

    @Override
    public int hashCode() {
        return Objects.hash(cno, cname, credit);
    }

    public String getCno() {
        return cno;
    }

    public void setCno(String cno) {
        this.cno = cno;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getCredit() {
        return credit;
    }

    public void setCredit(String credit) {
        this.credit = credit;
    }
}
